const db = require('../db')

exports.GuoList = (req, res) => {
    const sqlStr = `SELECT * FROM guolist`
    db.query(sqlStr, (err, results) => {
        if (err) return res.cc(err)
        res.send({
            status: 0,
            msg: '信息已获取',
            data: results
        })
    })
}

exports.DayList = (req, res) => {
    const sqlStr = `SELECT * FROM daylist`
    db.query(sqlStr, (err, results) => {
        if (err) return res.cc(err)
        res.send({
            status: 0,
            msg: '信息已获取',
            data: results
        })
    })
}

exports.GratisList = (req, res) => {
    const sqlStr = `SELECT * FROM gratislist`
    db.query(sqlStr, (err, results) => {
        if (err) return res.cc(err)
        res.send({
            status: 0,
            msg: '信息已获取',
            data: results
        })
    })
}

exports.number = (req, res) => {
    const sqlStr = `SELECT * FROM listnumber`
    db.query(sqlStr, (err, results) => {
        if (err) return res.cc(err)
        res.send({
            status: 0,
            msg: '信息已获取',
            data: results
        })
    })
}

exports.classify = (req, res) => {
    const sqlStr = `SELECT * FROM classify`
    db.query(sqlStr, (err, results) => {
        if (err) return res.cc(err)
        res.send({
            status: 0,
            msg: '信息已获取',
            data: results
        })
    })
}